<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

use think\Route;

//绑定域名部署 - API     谨慎修改
Route::domain("api",function(){
    //配置一个动态路由
    Route::rule("/","api/v1.Index/index");
    //配置user模块路由
    Route::rule("/user/:function","api/v1.User/:function");
    Route::rule("/user/","api/v1.Common.Error/index");
});



//爬取数据，谨慎使用
Route::rule("/qs","index/index/test");

//数据接口

Route::rule("/trialdata","api/v1.trial/index");

Route::rule("/productdata","api/v1.product/index");

Route::rule("/bannerdata","api/v1.banner/index");

Route::rule("/regsiter","api/v1.user/regsiter");


//前台模块路由
Route::rule("/home","index/Home/index");
Route::rule("/trial","index/Trial/trial");
Route::rule("/product","index/Product/product");
Route::rule("/register","index/Register/register");
Route::rule("/login","index/Login/login");


//生成验证码的路由
//Route::rule("/verifycode/:option","index/VerifyCode/:option");
Route::rule("/verifycode","index/VerifyCode/getCode");
//Route::rule("/verifycode/checkCode","index/VerifyCode/checkCode");

//验证验证码的路由，并传参到注册接口
Route::rule("/checkcode","index/VerifyCode/checkCode");

//发送邮件至邮箱的路由
Route::rule("/email","index/index/mail");

//账号注册激活的路由
Route::rule("/active","index/index/active");

//账号登录的路由
Route::rule("/userlogin","api/v1.User/login");